package com.scu.hotelsystem.service;

import com.scu.hotelsystem.dao.RoomBillDao;
import com.scu.hotelsystem.pojo.RoomBill;
import com.scu.hotelsystem.util.search.RoomBillSearch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class RoomBillServiceImpl implements RoomBillService {

    @Autowired
    private RoomBillDao roomBillDao;

    @Override
    public int addRoomBill(RoomBill roomBill) {
        return roomBillDao.addRoomBill(roomBill);
    }

    @Override
    public List<RoomBill> searchRoomBillList(RoomBillSearch roomBillSearch, int index, int limit) {
        return roomBillDao.searchRoomBillList(roomBillSearch,index,limit);
    }

    @Override
    public int deleteRoomBill(int[] idList) {
        return roomBillDao.deleteRoomBill(idList);
    }
}
